<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
</head>
<body>
	<form action="" method="get">
		<input type="text" name="id" value="1" />
		<input type="text" name="name" value="1" /> 
		<input type="submit" />
	</form>
	<form action="" method="post">
		<input type="text" name="id" value="1" />
		<input type="text" name="name" value="1" /> 
		<input type="submit" />
	</form>
	
	<button onclick="put()">put</button>
	<button onclick="del()">delete</button>
	
	<script type="text/javascript">
		function put() {
			$.ajax({
				url : '../restful',
				type : 'put',
				data : {
					id : 1,
					name : 2
				},
				success : function(data) {
					
				}
			})
		}
		function del() {
			$.ajax({
				url : '../restful',
				type : 'delete',
				data : {
					id : 1,
					name : 2
				},
				success : function(data) {
					
				}
			})
		}
	</script>
</body>
</html>